[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
< Less than operator
exp1 < exp2 Test for exp1 less than exp2
exp1, exp2 any expression of type int, float, char, enum, or
related types
< is a relational operator, yielding a value of TRUE if exp1 is less
than exp2; or FALSE if exp1 is not less than exp2. For string
operands, the strings are compared according to the collating sequence.
if ( number < guess )
...
do {
...
} while ( tries < 10 );
> Greater Than operator
exp1 > exp2 Test for exp1 greater than exp2
exp1, exp2 any expression of type int, float, char, enum, or
related types
> is a relational operator, yielding a value of TRUE if exp1 is greater
than exp2; or FALSE, if exp1 is not greater than exp2. For string
operands, the strings are compared according to the collating sequence.
if ( number > guess )
...
<= Less Than or Equal to operator
exp1 <= exp2 Test for exp1 less than or equal to exp2
exp1, exp2 any expression of type int, float, char, enum, or
related types
<= is a relational operator, yielding a value of TRUE if exp1 is less
than or equal to exp2, and FALSE otherwise. For string operands, the
strings are compared according to the collating sequence.
if ( number <= guess )
...
do {
...
} while ( tries <= 9 );
>= Greater Than or Equal To
exp1 >= exp2 Test for exp1 greater than or equal to exp2
exp1, exp2 any expression of type int, float, char, enum, or
related types
>= is a relational operator, yielding a value of TRUE exp1 is greater
than or equal to exp2, and FALSE otherwise. For string operands, the
strings are compared according to the collating sequence.
if ( number >= guess )
...
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson